Appendix A

Instruction Set

Introduction

Appendix contains all instructions presented separately with examples for their use. Syntax, description and its effects on status bits are given for each instruction.

 

A.1 Write constant in W register

A.2 Copy W to f

A.3 Copy f to d

A.4 Write 0 in W

A.5 Write 0 in f

A.6 Copy the nibbles from f to d crosswise

A.7 Add W to a constant

A.8 Add W to f

A.9 Subtract W from a constant

A.10 Subtract W from f

A.11 Logic AND W with constant

A.12 Logic AND W with f

A.13 Logic OR W with constant

A.14 Logic ILI W with f

A.15 Logic exclusive OR W with constant

A.16 Logic exclusive OR W with f

A.17 Increment f

A.18 Decrement f

A.19 Rotate f to the left through CARRY

A.20 Rotate f to the right through CARRY

A.21 Complement f

A.22 Reset bit b in f

A.23 Set bit b in f

A.24 Test bit b in f, skip if it = 0

A.25 Test bit b in f, skip if =1

A.26 Increment f, skip if=0

A.27 Decrement f, skip if = 0

A.28 Jump to address

A.29 Call a program

A.30 Return from a subprogram

A.31 Return from a subprogram with constant in W

A.32 Return from interrupt routine

A.33 No operation

A.34 Initialize watchdog timer

A.35 Stand by mode